Isaku Yamahata [Thu, 15 May 2008 07:23:56 +0000 (16:23 +0900)]
merge with xen-unstable.hg
Isaku Yamahata [Thu, 15 May 2008 05:53:48 +0000 (14:53 +0900)]
[IA64] Build new infrastructure for fast fault handling path.
1. use jump table to dispatch virtualization faults.
2. for virtualization faults, handler is executed with psr.i=0, psr.ic=0,
psr.bn=0. less context switch.
3. use register stack instead of memory stack to switch context.
4. Use C code to handle faults as possible, to reduce maintanance efforts,
remove assembly handlers for rsm , ssm, mov to psr, mov to rr.
5. add fast path C handler for rsm, ssm, mov to psr, rfi.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Isaku Yamahata [Thu, 15 May 2008 05:18:38 +0000 (14:18 +0900)]
[IA64] fix sal emulation.
fix sal emulation, SAL_SET_VECTORS, SAL_MC_SET_PARAMS.
It allowed any domains to change system wide state. But only
dom0 is able to change it.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Thu, 15 May 2008 05:18:38 +0000 (14:18 +0900)]
[IA64] remove warnings in replace_grant_host_mapping()
This patch removes warnings in replace_grant_host_mapping().
> mm.c: In function 'replace_grant_host_mapping':
> mm.c:2194: warning: 'new_page_mfn' may be used uninitialized in this function
> mm.c:2190: warning: 'old_pte.pte' may be used uninitialized in this function
> mm.c:2188: warning: 'cur_pte.pte' may be used uninitialized in this function
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Thu, 15 May 2008 05:18:38 +0000 (14:18 +0900)]
[IA64] remove warning in vmx_final_setup_guest()
This patch removes the warning in vmx_final_setup_guest()
> vmx_init.c:497: warning: unused variable 'sw'
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Wed, 14 May 2008 13:12:53 +0000 (14:12 +0100)]
x86: Make MSI-X work with 64-bit BARs
The code for working out the base address of a 64-bit BAR currently
puts the two halves together in the wrong order and leaves the type
bits in the resulting value. It also treats
PCI_BASE_ADDRESS_MEM_TYPE_64 as a flag rather than an enumeration
value.
Signed-off-by: Neil Turton <nturton@solarflare.com>
Keir Fraser [Wed, 14 May 2008 12:55:26 +0000 (13:55 +0100)]
x86: Implement cpufreq ondemand policy
Based on initialized cpufreq infrustructure, setup a timer on
each PSD domain, periodicly sample cpu load and driver cpu to
some Px state according to cpu load and cpu coordination.
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Keir Fraser [Wed, 14 May 2008 12:55:11 +0000 (13:55 +0100)]
x86: Setup cpufreq infrasturcture, driver and tools
Initializing basic Px data structure, setup cpufreq infrastructure:
* cpufreq data structure initializing, including freq table and policy;
* basic driver and tools, to measure freq or drive to Px target;
* setup _PSD domain to coordinately work;
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Keir Fraser [Wed, 14 May 2008 12:50:46 +0000 (13:50 +0100)]
Get ACPI Px from dom0 and choose Px controller
Add platform op hypercall case to get ACPI Px info from dom0.
Chose Px controller from dom0 (cpufreq=dom0-kernel)
or hypervisor (cpufreq=xen).
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Keir Fraser [Wed, 14 May 2008 12:25:19 +0000 (13:25 +0100)]
ia64: fix domain restore
A domain fails to restore on IA64 since cset 17524:
18727843db60.
This patch fixes it temporarily. Guest CPUID configuration for IA64
might be implemented in the future.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Wed, 14 May 2008 08:52:25 +0000 (09:52 +0100)]
Fix XEN_SYSCTL_physinfo to handle NUMA info properly.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 14 May 2008 08:31:44 +0000 (09:31 +0100)]
hvm_op: Fix public header file to provide limited exposure to
tools-only interface.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 14 May 2008 08:19:05 +0000 (09:19 +0100)]
xend: fix block protocol mismatch on save/restore
The protocol field of the blkif interface is correct at startup for a
guest of a different mode from dom0 (eg. 32-bit dom0, 64-bit guest).
However, this property is not persisted on save, so a later restore
(or migrate) will setup the block interface with the wrong mode.
Signed-off-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Keir Fraser [Wed, 14 May 2008 08:16:40 +0000 (09:16 +0100)]
qemu: Fix shift-insert behavior
This patch is related to Changeset 15635:
7bdc9f6407d3
<http://xenbits.xensource.com/staging/xen-unstable.hg?rev/
7bdc9f6407d3>
[PVFB] Fix shift key for graphical vnc display.
With above patch, if a user presses shift-insert, qemu sends shift
down, shift up, insert down and then another shift key down (see trace
below). This makes it impossible to do shift insert pasting or use
guest hot shifted-Fkeys.
Shift Insert trace:
do_key_event():1135 keycode:2a shift down
kbd_put_keycode():539 keycode:2a send shift down
do_key_event():1135 keycode:d2 insert down
kbd_put_keycode():539 keycode:aa send shift up
kbd_put_keycode():539 keycode:e0 send insert down
kbd_put_keycode():539 keycode:52
do_key_event():1135 keycode:d2 insert up
kbd_put_keycode():539 keycode:e0 send insert up
kbd_put_keycode():539 keycode:d2
kbd_put_keycode():539 keycode:2a send shift down
do_key_event():1135 keycode:2a shift up
kbd_put_keycode():539 keycode:aa send shift up
This patch adds a check for the keycode being shiftable, something
other than a keypad key, f1-12 , insert, del , etc. before allowing
the press_shift_up() operation.
Signed-off-by: Pat Campbell <plc@novell.com>
Keir Fraser [Wed, 14 May 2008 08:15:02 +0000 (09:15 +0100)]
qemu: Send unit_attention on cd-rom not_ready to ready transition
Patch sends a UNIT_ATTENTION(6), MEDIUM_MAY_HAVE_CHANGED(0x28) sense
when cdrom transitions from not ready to ready.
ATA Packet interface for CD-ROMS, SFF8020i.pdf. See state diagram
Figure 12, page 82 and Table 44 -recommended Sense Key, ASC
With patch in place HVM win2008 server guest sees the CD/DVD contents
have changed when the media is switched.
Signed-off-by: Pat Campbell <plc@novell.com>
Keir Fraser [Wed, 14 May 2008 08:13:48 +0000 (09:13 +0100)]
qemu: add 0xe0 prefix to r-ctrl and r-alt keycodes
Patch puts 0xe0 prefix before putting right alt or right cntrl
keycodes. Also adds keysm definition for ISO_Left_Tab.
Signed-off-by: Pat Campbell <plc@novell.com>
Keir Fraser [Wed, 14 May 2008 08:11:40 +0000 (09:11 +0100)]
ioemu: Fix handling of phy: block devices.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Tue, 13 May 2008 14:08:17 +0000 (15:08 +0100)]
ioemu: Fix PVFB backend to validate frontend's frame buffer description
A buggy or malicious frontend can describe its shared framebuffer to
the backend in a way that makes the backend map an arbitrary amount of
guest memory, malloc an arbitrarily large internal buffer, copy
arbitrary memory to that buffer, even beyond its end. A domU running
a malicious frontend can abuse the former two for denial of service
attacks against dom0. It can abuse the third to write arbitrary
backend memory. It can abuse all three to terminate or crash the
backend. Arbitrary code execution looks quite feasible.
In more detail (ignoring #ifdef CONFIG_STUBDOM code):
The frame buffer is described by the following parameters:
* fb_len (size of shared framebuffer)
* width, height, depth
* row_stride, offset
fb_len is fixed on startup. The frontend can modify the other
parameters by sending a XENFB_TYPE_RESIZE event.
xenfb_read_frontend_fb_config() limits fb_len according to backend
configuration parameter videoram (from xenstore), if present. I
believe videoram is not present by default.
xenfb_map_fb() uses fb_len to map the frontend's framebuffer.
The frontend can make it map arbitrarily much, unless limited by the
videoram configuration parameter. This flaw always existed.
xenfb_register_console() and xenfb_on_fb_event() pass width, height,
depth and rowstride to QEMU's DisplayState object. The object sets
itself up to work directly on the framebuffer (shared_buf true) if
parameters allow that. Else it allocates an internal buffer of size
height * width * depth / 8 (shared_buf false).
The frontend can make it allocate arbitrarily much. This flaw always
existed.
xenfb_register_console() and xenfb_on_fb_event() pass width, height,
depth and rowstride to QEMU's DisplayState object. The object sets
itself up to work directly on the framebuffer (shared_buf true) if
parameters allow that. Else it allocates an internal buffer of size
height * width * depth / 8 (shared_buf false).
The frontend can make it allocate arbitrarily much. This flaw was
introduced by the move of PVFB into QEMU (xen-unstable cset 16220
ff).
xenfb_on_fb_event() uses width and height to clip the area of an
update event. It then passes that area to xenfb_guest_copy().
xenfb_invalidate() passes the complete screen area to
xenfb_guest_copy(). xenfb_guest_copy() copies the argument area (x,
y, w, h) into the internal buffer, unless shared_buf is true. This
copies h blocks of memory. The i-th copy (counting from zero) copies
w * depth / 8 bytes
from
shared framebuffer + offset + (y + i) * row_stride + x * depth / 8
to
internal buffer + (y + i) * ds->linesize + x * ds->depth / 8
where ds->linesize and ds->depth are parameters of the internal buffer
chosen by the backend.
This copy can be made to read from the shared framebuffer and write to
the internal buffer out of bounds. I believe the frontend can abuse
this to write arbitrary backend memory.
The flaw in its current form was introduced by the move of PVFB into
QEMU (xen-unstable cset 16220 ff). Before, the framebuffer was always
shared.
From: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 13 May 2008 11:46:45 +0000 (12:46 +0100)]
[Xend/security] Refactor the code that recalculates the label during a policy update
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Tue, 13 May 2008 11:43:24 +0000 (12:43 +0100)]
Xend: Fix blkif type check for tap devices.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
Keir Fraser [Tue, 13 May 2008 09:40:49 +0000 (10:40 +0100)]
Intel vmx: To correctly detect default1 vmx features which may
actually be switched to 0, we must check VMX_BASIC_MSR[55] and
possibly check a set of 'true' feature MSRs.
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 13 May 2008 09:19:54 +0000 (10:19 +0100)]
Fix guest boot if set empty cdrom in config file
This is because function "uname = config.get('uname', '')" returns '',
rather than None, if uname is not in config variable.
Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
Keir Fraser [Tue, 13 May 2008 09:16:54 +0000 (10:16 +0100)]
x86: Avoid deep recusrsion when destroying a domain and reaping pagetables.
From: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 13 May 2008 08:58:18 +0000 (09:58 +0100)]
Add extra CPUID config examples to sample HVM config file.
From: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 13 May 2008 08:48:55 +0000 (09:48 +0100)]
XM/XenAPI: Add cdrom support when creating domains by xm through Xen API.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
Keir Fraser [Tue, 13 May 2008 08:48:40 +0000 (09:48 +0100)]
XM/XenAPI: Add blktap support when creating domains by xm through Xen API.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
Keir Fraser [Tue, 13 May 2008 08:47:52 +0000 (09:47 +0100)]
minios: free fbfront resources on error/shutdown
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Tue, 13 May 2008 08:21:28 +0000 (09:21 +0100)]
Add missing MSI related part in public pciif.h
Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
Keir Fraser [Tue, 13 May 2008 08:20:23 +0000 (09:20 +0100)]
Further minor ssl relo fixes.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Keir Fraser [Tue, 13 May 2008 08:19:07 +0000 (09:19 +0100)]
Fix relocation ssl/tls support
* Make a wrapper of read/write sock.fileno().
* Makes pyOpenSSL an optional package.
* Implement reference:
http://twistedmatrix.com/trac/browser/trunk/twisted/internet/tcp.py
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Keir Fraser [Mon, 12 May 2008 10:19:09 +0000 (11:19 +0100)]
xend: Add syntax check for block devices
If we define wrong values to a disk parameter in domain configuration
files, we get an error message or a guest OS panic.
1. If we define a wrong disk type, xm create command error occurs
about 100 seconds later.
e.g. disk=['xyz:/xen/root-vm1.img,hda1,w']
2. If we forget a disk type, a guest OS panic occurs.
e.g. disk=['/xen/root-vm1.img,hda1,w']
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Mon, 12 May 2008 10:16:43 +0000 (11:16 +0100)]
ioemu: Fix build: use uint64_t rather than u64.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 12 May 2008 10:01:21 +0000 (11:01 +0100)]
minios: free blkfront resources on error/shutdown
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Mon, 12 May 2008 09:36:27 +0000 (10:36 +0100)]
minios: free netfront resources on error/shutdown
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Mon, 12 May 2008 09:16:18 +0000 (10:16 +0100)]
x86: only print pages' mfn-s in dump_pageframe_info()
Printing page_to_maddr() and page_to_mfn() of the same page is
redundant, and _p(page_to_maddr(page)) is even incorrect on x86/PAE.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 12 May 2008 09:15:07 +0000 (10:15 +0100)]
x86: fix a few 32-on-64 compat mode issues
- handle VCPUOP_register_vcpu_info and VCPUOP_get_physid (and add
respective layout checks)
- add missing structure size check for struct vcpu_info
- add missing layout check for vcpu_set_periodic_timer
- handle VCPUOP_set_singleshot_timer via argument translation as the
structure sizes differ (due to padding in 64-bits)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 12 May 2008 09:14:01 +0000 (10:14 +0100)]
ia64 pv-on-hvm: __XEN_INTERFACE_VERSION__ is needed to assemble
platform-pci/xcom_asm.S, otherwise incompatible kernel module is
built.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Mon, 12 May 2008 09:13:15 +0000 (10:13 +0100)]
Fix xmexamples to reflect new meaning of cpus= config option.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Mon, 12 May 2008 09:11:23 +0000 (10:11 +0100)]
stubdom: let lwIP check TCP sums as they are now correct.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Mon, 12 May 2008 09:10:45 +0000 (10:10 +0100)]
minios: clear FB content since _xmalloc may return non-zeroed memory
(in debug mode, notably).
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Mon, 12 May 2008 09:10:03 +0000 (10:10 +0100)]
pvfb/ioemu: transmit refresh interval advice from backend to frontend
which permits the frontend to avoid useless polls.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Mon, 12 May 2008 09:09:12 +0000 (10:09 +0100)]
ioemu: fix disk format security vulnerability
* make the xenstore reader in qemu-dm's startup determine which
of qemu's block drivers to use according to the xenstore
backend `type' field. This `type' field typically comes from
the front of the drive mapping string in ioemu. The
supported cases are:
xm config file string `type' image format qemu driver
phy:[/dev/]<device> phy raw image bdrv_raw
file:<filename> file raw image bdrv_raw
tap:aio:<filename> tap raw image bdrv_raw
tap:qcow:<image> tap not raw autoprobe
tap:<cow-fmt>:<image> tap named format bdrv_<cow-fmt>
It is still necessary to autoprobe when the image is specified as
`tap:qcow:<image>', because qemu distinguishes `qcow' and `qcow2'
whereas blktap doesn't; `qcow' in xenstore typically means what
qemu calls qcow2. This is OK because qemu can safely distinguish
the different cow formats provided we know it's not a raw image.
* Make the format autoprobing machinery never return `raw'. This has
two purposes: firstly, it arranges that the `tap:qcow:...' case
above can be handled without accidentally falling back to raw
format. Secondly it prevents accidents in case the code changes in
future: autoprobing will now always fail on supposed cow files which
actually contain junk, rather than giving the guest access to the
underlying file.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Mon, 12 May 2008 09:07:26 +0000 (10:07 +0100)]
x86 hvm: Support MSI-X for HVM domains.
Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
Keir Fraser [Mon, 12 May 2008 09:06:40 +0000 (10:06 +0100)]
x86 hvm: Clean MSI related data when destroy domain.
Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
Keir Fraser [Mon, 12 May 2008 09:01:01 +0000 (10:01 +0100)]
x86: Fix fatal page fault when vram dirty logic handles MMIO of passthrough devices.
Signed-off-by: Qing He <qing.he@intel.com>
Keir Fraser [Thu, 8 May 2008 15:58:33 +0000 (16:58 +0100)]
Clean up shadow code after the removal of non-PAE 32-bit builds
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Thu, 8 May 2008 13:33:31 +0000 (14:33 +0100)]
xend: Fix and improve error handling for failed suspend/migrate
This has been broken since cset 16964:
5d84464dc1fc
Also deal better with very early errors (close sender side socket)
Signed-off-by: Steven Hand <steven.hand@cl.cam.ac.uk>
Keir Fraser [Thu, 8 May 2008 13:32:11 +0000 (14:32 +0100)]
i386: Remove non-PAE hypervisor build target.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 May 2008 12:40:40 +0000 (13:40 +0100)]
Remove defunct powerpc port.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 May 2008 12:15:45 +0000 (13:15 +0100)]
shadow: drop guest VRAM write access after some idleness
If the video RAM has been kept clean for at least 2 seconds, we can
afford taking the time to drop guest write access, which allows us to
save the dirty bit scanning entirely until we get a guest page handle.
From: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 8 May 2008 12:14:27 +0000 (13:14 +0100)]
minios: fix and enforce block_domain atomicity
To ensure that the timer event is not lost, block_domain requires that
event delivery is disabled. SCHEDOP_block re-enables them, so for
coherency (and fixing a bug actually), we should re-disable them
after. Also, make sure that the caller disabled them.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 8 May 2008 10:55:13 +0000 (11:55 +0100)]
minios: in non-x86 case, use wmb to enforce ordering between
evtchn_upcall_pending and evtchn_pending_sel stores.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 8 May 2008 10:53:39 +0000 (11:53 +0100)]
minios: clear the event before calling the handler since (especially
in the SMP case) the handler may make another domain send an event
again, and that must not be lost.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 8 May 2008 10:27:22 +0000 (11:27 +0100)]
minios: fix port selection shifts
Event selectors span unsigned longs, whose size is not always 32 bits.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Thu, 8 May 2008 10:20:04 +0000 (11:20 +0100)]
Xend: Fix handling of vnc params.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
Keir Fraser [Thu, 8 May 2008 10:18:34 +0000 (11:18 +0100)]
Fix the boot of ia32pae Windows xp guest (up acpi)
- X86_FEATURE_APIC should be in edx register.
Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
Keir Fraser [Thu, 8 May 2008 10:15:58 +0000 (11:15 +0100)]
xend: Improve "cpus" parameter to be able to define CPU affinities for each VCPU
If we define the form of list of string to "cpus" parameter,
different CPU affinities are set for each VCPU as follows.
# grep cpus /etc/xen/vm1
cpus = ["2", "3"]
vcpus = 2
# xm create vm1
Using config file "/etc/xen/vm1".
Started domain vm1
# xm vcpu-list vm1
Name ID VCPU CPU State Time(s)
CPU Affinity
vm1 1 0 2 r-- 3.5 2
vm1 1 1 3 -b- 3.2 3
If we define the form of string to "cpus" parameter as before,
a same CPU affinity is set for each VCPU as follows.
# grep cpus /etc/xen/vm2
cpus = "2,3"
vcpus = 2
# xm create vm2
Using config file "/etc/xen/vm2".
Started domain vm2
# xm vcpu-list vm2
Name ID VCPU CPU State Time(s)
CPU Affinity
vm2 2 0 3 -b- 3.0
2-3
vm2 2 1 2 r-- 2.6
2-3
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Thu, 8 May 2008 10:13:51 +0000 (11:13 +0100)]
Fixed typos in xmexamples.
Signed-off-by: Hiroya INAKOSHI <inakoshi.hiroya@jp.fujitsu.com>
Keir Fraser [Wed, 7 May 2008 13:16:48 +0000 (14:16 +0100)]
XM/XenAPI: Enable Console other_config parameters to be passed through Xen API.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
Keir Fraser [Wed, 7 May 2008 08:45:55 +0000 (09:45 +0100)]
x86 pci passthrough: Make printk messages more exact.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Wed, 7 May 2008 08:30:34 +0000 (09:30 +0100)]
Vt-d doc: Update modification time.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Wed, 7 May 2008 08:23:29 +0000 (09:23 +0100)]
Update for vtd.txt: add VT-d hotplug description, remove MSI
limitation note because Xen has supported MSI, and add link of VT-d
howto on xen wiki for more information about VT-d enabled systems.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Keir Fraser [Wed, 7 May 2008 08:22:05 +0000 (09:22 +0100)]
VT-d: Remove unused function dma_pte_free_pagetable().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 7 May 2008 08:19:40 +0000 (09:19 +0100)]
VT-d: Fix free VT-d page table issue
This patch frees VT-d page tables from pgd, rather than free them
according to a guest address range.
This fixes [Bug 1244] Poweroff/Destroying HVM guest causes HV
crash. http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1244.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Wed, 7 May 2008 08:17:52 +0000 (09:17 +0100)]
msix: Further fixes to Python arithmetic.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 7 May 2008 08:15:49 +0000 (09:15 +0100)]
x86 shadow: Fix typo in a code comment.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Tue, 6 May 2008 15:35:44 +0000 (16:35 +0100)]
minios: drop volatile qualifier from some status variables
since we already use memory barriers as approriate to prevent
concurrent access with event handlers.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Tue, 6 May 2008 15:29:01 +0000 (16:29 +0100)]
minios: let events get mixed
since events do not need to be counted
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 6 May 2008 15:20:54 +0000 (16:20 +0100)]
x86 hvm: Warn only once per time source when the periodic tiemout is
set 'too small'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 6 May 2008 15:20:24 +0000 (16:20 +0100)]
x86 hvm: Support interrupt delivery for PIT channel 0 when in modes 3 and 4.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 6 May 2008 14:31:15 +0000 (15:31 +0100)]
xend: Only import OpenSSL package when it is required.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 6 May 2008 12:34:52 +0000 (13:34 +0100)]
minios: fix thread safety of xenbus watches by requiring callers to
provide their own queue of events, because else we can not dispatch to
watchers running in parallel.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Tue, 6 May 2008 12:32:18 +0000 (13:32 +0100)]
SVM: clean up __get_instruction_length_from_list()
Remove unused arguments, fix its behaviour near page boundaries,
inject appropriate pagefaults, and inject #GP if the instruction is
not decodable or %eip is not pointing to valid RAM.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 6 May 2008 10:05:00 +0000 (11:05 +0100)]
x86 hvm: Simplify and consolidate logic for HLT emulation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 6 May 2008 09:25:34 +0000 (10:25 +0100)]
x86, Intel: Make only EST feature visible to dom0 to enable Cx-state
logic. There should be no need to make MWAIT visible.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 6 May 2008 09:19:10 +0000 (10:19 +0100)]
x86, hvm: stdvga cache always on
currently the hypervisor vga cache (stdvga.c) enables itself only in
graphical mode and in the a0000h-affffh range. However there is no
reason for this: it already allocates enought memory to map the whole
vram. I am attaching a patch that implements the bank switching
mechanism in stdvga.c, allowing the cache to be always enabled when
the emulated graphic card is in VGA mode.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 6 May 2008 09:05:52 +0000 (10:05 +0100)]
xend: Refactor security.on() call
I am refactoring the security.on() call to return the actual type of
the security module that is found to be enabled rather than just
returning True or False.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Mon, 5 May 2008 09:16:58 +0000 (10:16 +0100)]
Fix the address calculation of acpi enable reg according to ACPI spec.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Keir Fraser [Mon, 5 May 2008 09:16:06 +0000 (10:16 +0100)]
Enable Px/Cx related CPUID/MSR bits for dom0 to get correct Px/Cx info.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Keir Fraser [Mon, 5 May 2008 09:13:17 +0000 (10:13 +0100)]
shadow: Fix dirty vram tracking typo.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Mon, 5 May 2008 09:12:44 +0000 (10:12 +0100)]
Calculation of MSI-X table size needs to be masked.
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
Keir Fraser [Sun, 4 May 2008 07:32:00 +0000 (08:32 +0100)]
i386: Fix 32-bit x86 build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 2 May 2008 14:10:20 +0000 (15:10 +0100)]
Add missing ChangeLog entries
A couple of recent changes need ChangeLog entries.
Signed-off-by: John Levon <john.levon@sun.com>
Keir Fraser [Fri, 2 May 2008 14:08:27 +0000 (15:08 +0100)]
shadow: track video RAM dirty bits
This adds a new HVM op that enables tracking dirty bits of a range of
video RAM. The idea is to optimize just for the most common case
(only one guest mapping, with sometimes some temporary other
mappings), which permits to keep the overhead on shadow as low as
possible.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 2 May 2008 13:35:27 +0000 (14:35 +0100)]
minios: end watch of FS backend state value
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 2 May 2008 12:48:36 +0000 (13:48 +0100)]
ioemu: move VNC-specific switchbpp member to VncState
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 2 May 2008 12:48:10 +0000 (13:48 +0100)]
ioemu: always disable shared buffer in text mode
by not calling get_bpp() (which only makes sense in graphical mode)
and always use 0 instead.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 2 May 2008 12:47:46 +0000 (13:47 +0100)]
ioemu: pump SDL events on resize
When sdl_resize resizes the SDL window, some window manager send back
a ConfigureNotify event, which triggers a SDL_VIDEORESIZE event. That
event, however, is seen only much later, on the next VGA refresh
round. If the guest quickly switches to another resolution in between,
the SDL_VIDEORESIZE event makes us erroneously rescale that new
resolution into the old one.
This patch makes us pump that window manager event, so that no
SDL_VIDEORESIZE event is generated.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 2 May 2008 12:47:01 +0000 (13:47 +0100)]
[libfsimage/zfs] compilation fix ZFS libfsimage support.
Depending on environments, zfs libfsimage support doesn't compile.
This patch fixes it.
ia64-linux-gnu-gcc -DPIC -O2 -fomit-frame-pointer
-fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wno-unused-value -Wdeclaration-after-statement
-I/usr/ia64-linux-gnu/
sys-root/usr/include -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -I../../../tools/libfsimage/common/ -Werror
-Wp,-MD,.zfs_lzjb.opic.d -fPIC -c -o zfs_lzjb.opic zfs_
lzjb.c
In file included from fsys_zfs.h:41,
from zfs_lzjb.c:25:
zfs-include/zfs_acl.h:29: error: redefinition of typedef uid_t
/usr/ia64-linux-gnu/sys-root/usr/include/sys/types.h:82: error:
previous declaration of uid_t was here
This depends on how __uid_t is defined in the system header.
No file under the zfs directory uses uid_t so that just removing
the definition in the zfs_acl.h looks reasonable.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Fri, 2 May 2008 12:46:16 +0000 (13:46 +0100)]
libxc foreign address translation bug
In the xc_translate_foreign_address function from libxc, there is a
check on the page directory entry to see if the page is 4K or 4M.
However, the check is looking at bit 3, when it should be looking at
bit 7. This patch fixes the problem.
Signed-off-by: Bryan D. Payne <bryan@thepaynes.cc>
Isaku Yamahata [Fri, 2 May 2008 08:01:32 +0000 (17:01 +0900)]
[IA64] warning fix of dom_fw_dom0.c
dom_fw_dom0.c: In function 'complete_dom0_memmap':
dom_fw_dom0.c:461: warning: unused variable 'flags'
dom_fw_dom0.c:460: warning: unused variable 'mpaddr'
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Wed, 7 May 2008 08:15:32 +0000 (17:15 +0900)]
[IA64] define VHPT_ENABLED in Rules.mk instead of the header file, vhpt.h.
VHPT_ENABLED is defined in vhpt.h, but it is intended for compile time
option. Defining in the header file caused that VHPT_ENABLED
is undefined in some files resulting in unintentional compilation.
Define the macro in Rules.mk resolves it. And minor modifications to
remove compilation error/warning.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Mon, 12 May 2008 02:24:47 +0000 (11:24 +0900)]
[IA64] cleanup: VTLB_PTE_IO_BIT is not used
VTLB_PTE_IO_BIT is not used any more.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Isaku Yamahata [Fri, 9 May 2008 09:40:58 +0000 (18:40 +0900)]
[IA64] fix restoring HVM domain with PV driver
The HVM domain with PV driver always panics after save/restore or
migration. This patch fixes it.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Isaku Yamahata [Fri, 9 May 2008 09:40:58 +0000 (18:40 +0900)]
[IA64] fix gmfn_to_mfn
gmfn_to_mfn should return INVALID_MFN when the gpfn is I/O page.
Using PV on HVM, I got the following error message.
(XEN) /xen/include/asm/mm.h:181:d2 Error pfn 2: rd=
f000000007fb4080, od=
0000000000000000, caf=
0000000000000000, taf=
0000000000000000
(XEN) memory.c:165:d2 Bad page free for domain 2
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Thu, 1 May 2008 15:38:56 +0000 (16:38 +0100)]
Add ZFS libfsimage support patch
Add support to pygrub and libfsimage to boot ZFS root filesystems.
Boot argument of zfs-bootfs is set to describe ZFS root pool and
boot filesystem object number. Boot argument bootpath is set to
describe the virtual device root mirror components.
Signed-off-by: Susan Kamm-Worrell <susan.kamm-worrell@sun.com>
Keir Fraser [Thu, 1 May 2008 15:37:46 +0000 (16:37 +0100)]
Fix lint in headers that are pulled into the Solaris tree.
Signed-off-by: Ryan Scott <ryan.scott@sun.com>
Keir Fraser [Thu, 1 May 2008 15:37:28 +0000 (16:37 +0100)]
Fix xenstore-client.c compile
errx() is not necessarily defined as a never-returns function. Fix
lookup_mode() to account for this.
Signed-off-by: John Levon <john.levon@sun.com>
Keir Fraser [Thu, 1 May 2008 15:36:58 +0000 (16:36 +0100)]
Allow .config to override the "cc_compile_by" and "cc_compile_domain" settings.
Signed-off-by: David Edmondson <dme@sun.com>
Keir Fraser [Thu, 1 May 2008 15:35:49 +0000 (16:35 +0100)]
Remove unimplemented xm migrate --resource option.
Signed-off-by: Gary Pennington <gary.pennington@sun.com>